package com.oracle.springbootjpa.dao;

import com.oracle.springbootjpa.po.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface UserDao extends JpaRepository<User,Long> {

    @Query("from  User  o  where o.username = :#{#user.username}")
    User findByUsernameAndPWD(@Param("user") User user);

}
